using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class SourceStatusMappingMap : EntityTypeConfiguration<SourceStatusMapping>
	{
		public SourceStatusMappingMap()
		{
			// Primary Key
			this.HasKey(t => t.Id);

			// Properties
			this.Property(t => t.SysStatus)
				.HasMaxLength(20);
				
			this.Property(t => t.CustomerStatus)
				.HasMaxLength(20);
				
			// Table & Column Mappings
			this.ToTable("SourceStatusMapping");
			this.Property(t => t.Id).HasColumnName("Id");
			this.Property(t => t.SourceId).HasColumnName("SourceId");
			this.Property(t => t.SysStatus).HasColumnName("SysStatus");
			this.Property(t => t.CustomerStatus).HasColumnName("CustomerStatus");
		}
	}
}

